package com.IntelligentCommunity.community.domain;

import com.IntelligentCommunity.common.core.annotation.Excel;
import com.IntelligentCommunity.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 小区对象 real_district
 *
 * @author zzpjx
 * @date 2024-07-19
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RealDistrict extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 小区名称 */
    @Excel(name = "小区名称")
    private String communityName;

    /** 经纬度中心点 */
    @Excel(name = "经纬度中心点")
    private String centerPoint;

    /** 经纬度区域 */
    @Excel(name = "经纬度区域")
    private String areaPoint;

    /** 出入口经纬度 */
    @Excel(name = "出入口经纬度")
    private String passagewayPoint;

    /** 小区图片 */
    @Excel(name = "小区图片")
    private String image;

    /** 父级 id */
    @Excel(name = "辖区 id")
    private Long areaId;

    @Excel(name = "楼栋数量")
    private  Integer buildingCount;

    @Excel(name = "辖区名称")
    private  String  name;

    /** 人口数量 */
    private Integer populationNum;

    /** 小区数量 */
    private Integer districtNum;

    /** 设备数量 */
    private Integer securityFacilitiesNum;

    /** 车辆数量 */
    private Integer vehicleNum;

    /** 实有力量 */
    private Integer realEstateNum;

    /** 单位数量 */
    private Integer unitNum;

    private Integer pageNum;

    private Integer pageSize;

    /**冗余字段*/
    private String areaIds;

    private Integer[] districtIds;

    public Integer getOffset() {
        if (pageNum != null && pageSize != null) {
            return (pageNum - 1) * pageSize;
        }
        return 0;
    }

}
